import matplotlib.pyplot as plt
import numpy as np
from scipy import signal

# for i in range(12):
#     print(1 - np.sin(np.pi * i / 4))
N = 12
xn = np.array([1, 0.3, 0, 0.3, 1, 1.7, 2, 1.7, 1, 0.3, 0, 0.3])

w = np.zeros((N, N), dtype=complex)

for k in range(N):
    for n in range(N):
        w[n, k] = np.exp(-1j * n * k * 2 * np.pi / N)


a = np.dot(xn, w) / N

print(a)
